package cate.game.train.kitchenware.msg;

import cate.common.util.GameResult;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBTrain;
import easy.java.dev.note.NoteField;

@ClientMsg(title ="厨具重铸保存的请求")
public class KitchenwareRecastSaveReq implements MsgInput {
    @NoteField("厨具uid")
    public String kitchenwareUid;
    @NoteField("英雄uid")
    public String heroUid;
    @NoteField("部位")
    public byte pos;
    @NoteField("重铸类型 1属性 2技能")
    public byte type;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        GameResult<Void> r = game.train.kitchenware.recastSave(cc.getRole(), kitchenwareUid, heroUid, pos, type);
        game.notice.message(cc.getRole(), r, true);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBTrain.KITCHENWARE_RECAST_SAVE_REQ;
    }
}
